package com.lzh.blog.admin.controller;

import com.lzh.lzhframework.domain.ResponseResult;
import com.lzh.lzhframework.domain.vo.feedback.NoticeMsgVo;
import com.lzh.lzhframework.service.MessageService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author luzhiheng
 * @Date 2023/12/10 18:54
 */
@RestController
@RequestMapping("/message")
public class MessageController {

    @Resource
    private MessageService messageService;

    /**
     * 查询未读消息
     *
     * @return
     */
    @GetMapping("/queryUnreadMsg")
    public ResponseResult queryUnreadMsg() {
        List<NoticeMsgVo> noticeMsgVoList = messageService.queryUnreadMsg();
        return ResponseResult.success(noticeMsgVoList);
    }
}
